home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 February / EnigmA AMIGA RUN 34 (1999)(G.R. Edizioni)(IT)[!][issue 1999-02].iso / www / amitrix / awn_1.7.lha / AWebNews_1.7 / install.awebnews.script < prev    next >
Text File  |  1996-12-22  |  4KB  |  167 lines

  1. ;$VER: AWebNews.installer 1.7
  2. ;20 Dec 1996 WHMP
  3. (procedure vertxt
  4. (cat
  5. (/(getversion  verfile) 65536)
  6. "."
  7. (-(getversion verfile) (*(/(getversion verfile) 65536) 65536) )
  8.   )
  9. )
  10.  
  11.  
  12. (procedure awebpref (if (askbool
  13.  (prompt "\n\n\n\n\nInstall AWebNews in Aweb's ARexx menu ?"
  14. "\n\nIf you have done this already, do not do it a second time.")
  15.  (help "\n\n\n\n\AWebNews is an online NewsReader program as well as a plug-in."
  16. "You probably want it in the menu."
  17. "This should not be done if AWebNews"
  18. " is already in AWeb's ARexx menu .")
  19.  )
  20. ;rexxmenu
  21.       ((run
  22.          (cat "echo >>ENV:AWeb/program \""
  23.             "AREX 6;" newsdir "/news.awebrx;AWebNews (Read News)\""
  24.          )
  25.       )
  26.       (run
  27.          (cat "echo >>ENVARC:AWeb/program \""
  28.             "AREX 6;" newsdir "/news.awebrx;AWebNews (Read News)\""
  29.          )
  30.       )
  31. ))
  32. (if (askbool
  33.  (prompt "\n\n\n\n\nInstall AWebNews as Aweb's News: plug-in ?"
  34. "\n\nDo not do this if you already have a News: plug-in installed.")
  35.  (help
  36. "\n\n\n To change the News: plugin, delete the old setting from inside"
  37. " AWeb-II first. If you do not have a News: plug-in installed go"
  38. " ahead with this part of the instalation.")
  39.  
  40.  )
  41. ;plugin
  42. (       (run
  43.          (cat "echo >>ENV:AWeb/network \""
  44.             "NWSC sys:rexxc/rx*N"
  45.             "NWSA " newsdir "/news.awebrx %a\""
  46.          )
  47.      )
  48. ; current stuff
  49.        (run
  50.          (cat "echo >>ENVARC:AWeb/network \""
  51.             "NWSC sys:rexxc/rx*N"
  52.             "NWSA " newsdir "/news.awebrx %a\""
  53.          )
  54.       )
  55. )      )
  56. )
  57. (set @default-dest "AWeb-II:")
  58. ; do we have a aweb-II:plugins ?
  59. ;(if (exists "AWeb-II:plugins" (noreq))
  60. ;useit
  61. (set @default-dest "AWeb-II:")
  62. ;ask user where
  63. (set efault-dest
  64.    (askdir (prompt ("\nPlease find  AWeb-II's  plugin drawer .\n"))
  65.            (disk)
  66.            (help "\n\nUsualy the same drawer containing the AWeb-II main program:"
  67. "\nOften 'AWeb-II:' is assigned to this drawer.")
  68.            (default @default-dest)
  69.            )
  70.  )
  71. ;what is the proper fix for aborting here?
  72. (set @default-dest efault-dest )
  73. ;)
  74.  
  75. (if (exists (tackon @default-dest "plugins") (noreq))
  76. ;plugdir ok
  77. (set plugdir (tackon @default-dest "plugins"))
  78.  
  79. ; are we in plugdir ?
  80.  (if (exists (tackon (pathonly @default-dest) "plugins") (noreq))
  81.  ;pludir ok
  82.  (set plugdir (tackon (pathonly @default-dest) "plugins"))
  83.  
  84.  ; no plugdir were out here
  85.  (
  86. (set plugdir  @default-dest )
  87. )
  88.  
  89.  )
  90. )
  91.  
  92. ;if we have a plugdir we try to install
  93. (if (exists (tackon plugdir "awebnews") (noreq))
  94. ;do re install
  95. (
  96. (message "\n\n\n\n\n Installing update."
  97. "\nYour configuration and newsgroup list will be preserved." )
  98.  )
  99. ;first time install make a drawer
  100. ((message "\n\n\n\n\nFirst time install Creating AWebNews drawer.")
  101. (set firsttime "yes")
  102. (makedir(tackon plugdir "AWebNews")(infos))
  103.  
  104. )
  105. )
  106. ;drawer ok so copy files
  107. (set newsdir (tackon plugdir "awebnews"))
  108. (set @default-dest newsdir)
  109.  
  110. ( if
  111. (< (getversion (tackon newsdir "news.awebrx"))   458764)
  112. ( if
  113. (> (getversion (tackon newsdir "news.awebrx"))
  114.    (getversion "news.awebrx")
  115. )
  116. ; a newer version exists
  117. (if (askbool
  118.  (prompt "\n\n\n\n The "
  119. ((set verfile "news.awebrx")(vertxt ))
  120. " version of AwebNews you are about to install is"
  121. " an older version than the one you already have ("
  122. ((set verfile (tackon newsdir "news.awebrx"))(vertxt ))
  123. ").\nInstall it anyways?"
  124. )
  125.  (help "\nThe version you are tring to install seems to be older than the one"
  126.  " you already have in place."
  127. "\n\nNote: versions dated earlier than 18 Dec 1996 had an imporoper version"
  128. " string. They are NOT newer than the version you are trying to install."  )
  129.  )
  130. (set nil  "yes")
  131. (exit)
  132. )
  133. )
  134. )
  135. ( if (=(getversion (tackon newsdir "news.awebrx"))
  136.        (getversion "news.awebrx")
  137.      )
  138. ; same version
  139. (if (askbool
  140.  (prompt "\n\n\n\n\n AwebNews "
  141. ((set verfile "news.awebrx")(vertxt ))
  142.  " is already installed. Install it again?")
  143.  (help "The version you are tring to install seems to be the same one"
  144.  " you already have in place.")
  145.  )
  146. (set nil  "yes")
  147. (exit)
  148. )
  149. )
  150.  
  151. ((copyfiles (dest newsdir) (source "AWebNews_doc.html") )
  152.  (copyfiles (dest newsdir) (source "confignews.awebrx") )
  153.  (copyfiles (dest newsdir) (source "news.awebrx") )
  154. )
  155. ; copy newsgroups if there are none
  156. (if (exists (tackon newsdir "newsgroups")(noreq))
  157. (set nil "yes")
  158.  (copyfiles (dest newsdir) (source "newsgroups") )
  159. )
  160.  
  161. ;try to install in aweb-II prefs.
  162. (
  163. awebpref
  164. )
  165. (exit)
  166.  
  167.